package com.sun.vo;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class CFriendExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    protected int limitStart = -1;

    protected int limitEnd = -1;

    public CFriendExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimitStart(int limitStart) {
        this.limitStart=limitStart;
    }

    public int getLimitStart() {
        return limitStart;
    }

    public void setLimitEnd(int limitEnd) {
        this.limitEnd=limitEnd;
    }

    public int getLimitEnd() {
        return limitEnd;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andFidIsNull() {
            addCriterion("FID is null");
            return (Criteria) this;
        }

        public Criteria andFidIsNotNull() {
            addCriterion("FID is not null");
            return (Criteria) this;
        }

        public Criteria andFidEqualTo(Integer value) {
            addCriterion("FID =", value, "fid");
            return (Criteria) this;
        }

        public Criteria andFidNotEqualTo(Integer value) {
            addCriterion("FID <>", value, "fid");
            return (Criteria) this;
        }

        public Criteria andFidGreaterThan(Integer value) {
            addCriterion("FID >", value, "fid");
            return (Criteria) this;
        }

        public Criteria andFidGreaterThanOrEqualTo(Integer value) {
            addCriterion("FID >=", value, "fid");
            return (Criteria) this;
        }

        public Criteria andFidLessThan(Integer value) {
            addCriterion("FID <", value, "fid");
            return (Criteria) this;
        }

        public Criteria andFidLessThanOrEqualTo(Integer value) {
            addCriterion("FID <=", value, "fid");
            return (Criteria) this;
        }

        public Criteria andFidIn(List<Integer> values) {
            addCriterion("FID in", values, "fid");
            return (Criteria) this;
        }

        public Criteria andFidNotIn(List<Integer> values) {
            addCriterion("FID not in", values, "fid");
            return (Criteria) this;
        }

        public Criteria andFidBetween(Integer value1, Integer value2) {
            addCriterion("FID between", value1, value2, "fid");
            return (Criteria) this;
        }

        public Criteria andFidNotBetween(Integer value1, Integer value2) {
            addCriterion("FID not between", value1, value2, "fid");
            return (Criteria) this;
        }

        public Criteria andUidIsNull() {
            addCriterion("UID is null");
            return (Criteria) this;
        }

        public Criteria andUidIsNotNull() {
            addCriterion("UID is not null");
            return (Criteria) this;
        }

        public Criteria andUidEqualTo(String value) {
            addCriterion("UID =", value, "uid");
            return (Criteria) this;
        }

        public Criteria andUidNotEqualTo(String value) {
            addCriterion("UID <>", value, "uid");
            return (Criteria) this;
        }

        public Criteria andUidGreaterThan(String value) {
            addCriterion("UID >", value, "uid");
            return (Criteria) this;
        }

        public Criteria andUidGreaterThanOrEqualTo(String value) {
            addCriterion("UID >=", value, "uid");
            return (Criteria) this;
        }

        public Criteria andUidLessThan(String value) {
            addCriterion("UID <", value, "uid");
            return (Criteria) this;
        }

        public Criteria andUidLessThanOrEqualTo(String value) {
            addCriterion("UID <=", value, "uid");
            return (Criteria) this;
        }

        public Criteria andUidLike(String value) {
            addCriterion("UID like", value, "uid");
            return (Criteria) this;
        }

        public Criteria andUidNotLike(String value) {
            addCriterion("UID not like", value, "uid");
            return (Criteria) this;
        }

        public Criteria andUidIn(List<String> values) {
            addCriterion("UID in", values, "uid");
            return (Criteria) this;
        }

        public Criteria andUidNotIn(List<String> values) {
            addCriterion("UID not in", values, "uid");
            return (Criteria) this;
        }

        public Criteria andUidBetween(String value1, String value2) {
            addCriterion("UID between", value1, value2, "uid");
            return (Criteria) this;
        }

        public Criteria andUidNotBetween(String value1, String value2) {
            addCriterion("UID not between", value1, value2, "uid");
            return (Criteria) this;
        }

        public Criteria andFriendidIsNull() {
            addCriterion("FRIENDID is null");
            return (Criteria) this;
        }

        public Criteria andFriendidIsNotNull() {
            addCriterion("FRIENDID is not null");
            return (Criteria) this;
        }

        public Criteria andFriendidEqualTo(String value) {
            addCriterion("FRIENDID =", value, "friendid");
            return (Criteria) this;
        }

        public Criteria andFriendidNotEqualTo(String value) {
            addCriterion("FRIENDID <>", value, "friendid");
            return (Criteria) this;
        }

        public Criteria andFriendidGreaterThan(String value) {
            addCriterion("FRIENDID >", value, "friendid");
            return (Criteria) this;
        }

        public Criteria andFriendidGreaterThanOrEqualTo(String value) {
            addCriterion("FRIENDID >=", value, "friendid");
            return (Criteria) this;
        }

        public Criteria andFriendidLessThan(String value) {
            addCriterion("FRIENDID <", value, "friendid");
            return (Criteria) this;
        }

        public Criteria andFriendidLessThanOrEqualTo(String value) {
            addCriterion("FRIENDID <=", value, "friendid");
            return (Criteria) this;
        }

        public Criteria andFriendidLike(String value) {
            addCriterion("FRIENDID like", value, "friendid");
            return (Criteria) this;
        }

        public Criteria andFriendidNotLike(String value) {
            addCriterion("FRIENDID not like", value, "friendid");
            return (Criteria) this;
        }

        public Criteria andFriendidIn(List<String> values) {
            addCriterion("FRIENDID in", values, "friendid");
            return (Criteria) this;
        }

        public Criteria andFriendidNotIn(List<String> values) {
            addCriterion("FRIENDID not in", values, "friendid");
            return (Criteria) this;
        }

        public Criteria andFriendidBetween(String value1, String value2) {
            addCriterion("FRIENDID between", value1, value2, "friendid");
            return (Criteria) this;
        }

        public Criteria andFriendidNotBetween(String value1, String value2) {
            addCriterion("FRIENDID not between", value1, value2, "friendid");
            return (Criteria) this;
        }

        public Criteria andStateIsNull() {
            addCriterion("STATE is null");
            return (Criteria) this;
        }

        public Criteria andStateIsNotNull() {
            addCriterion("STATE is not null");
            return (Criteria) this;
        }

        public Criteria andStateEqualTo(Integer value) {
            addCriterion("STATE =", value, "state");
            return (Criteria) this;
        }

        public Criteria andStateNotEqualTo(Integer value) {
            addCriterion("STATE <>", value, "state");
            return (Criteria) this;
        }

        public Criteria andStateGreaterThan(Integer value) {
            addCriterion("STATE >", value, "state");
            return (Criteria) this;
        }

        public Criteria andStateGreaterThanOrEqualTo(Integer value) {
            addCriterion("STATE >=", value, "state");
            return (Criteria) this;
        }

        public Criteria andStateLessThan(Integer value) {
            addCriterion("STATE <", value, "state");
            return (Criteria) this;
        }

        public Criteria andStateLessThanOrEqualTo(Integer value) {
            addCriterion("STATE <=", value, "state");
            return (Criteria) this;
        }

        public Criteria andStateIn(List<Integer> values) {
            addCriterion("STATE in", values, "state");
            return (Criteria) this;
        }

        public Criteria andStateNotIn(List<Integer> values) {
            addCriterion("STATE not in", values, "state");
            return (Criteria) this;
        }

        public Criteria andStateBetween(Integer value1, Integer value2) {
            addCriterion("STATE between", value1, value2, "state");
            return (Criteria) this;
        }

        public Criteria andStateNotBetween(Integer value1, Integer value2) {
            addCriterion("STATE not between", value1, value2, "state");
            return (Criteria) this;
        }

        public Criteria andCommonstateIsNull() {
            addCriterion("COMMONSTATE is null");
            return (Criteria) this;
        }

        public Criteria andCommonstateIsNotNull() {
            addCriterion("COMMONSTATE is not null");
            return (Criteria) this;
        }

        public Criteria andCommonstateEqualTo(Integer value) {
            addCriterion("COMMONSTATE =", value, "commonstate");
            return (Criteria) this;
        }

        public Criteria andCommonstateNotEqualTo(Integer value) {
            addCriterion("COMMONSTATE <>", value, "commonstate");
            return (Criteria) this;
        }

        public Criteria andCommonstateGreaterThan(Integer value) {
            addCriterion("COMMONSTATE >", value, "commonstate");
            return (Criteria) this;
        }

        public Criteria andCommonstateGreaterThanOrEqualTo(Integer value) {
            addCriterion("COMMONSTATE >=", value, "commonstate");
            return (Criteria) this;
        }

        public Criteria andCommonstateLessThan(Integer value) {
            addCriterion("COMMONSTATE <", value, "commonstate");
            return (Criteria) this;
        }

        public Criteria andCommonstateLessThanOrEqualTo(Integer value) {
            addCriterion("COMMONSTATE <=", value, "commonstate");
            return (Criteria) this;
        }

        public Criteria andCommonstateIn(List<Integer> values) {
            addCriterion("COMMONSTATE in", values, "commonstate");
            return (Criteria) this;
        }

        public Criteria andCommonstateNotIn(List<Integer> values) {
            addCriterion("COMMONSTATE not in", values, "commonstate");
            return (Criteria) this;
        }

        public Criteria andCommonstateBetween(Integer value1, Integer value2) {
            addCriterion("COMMONSTATE between", value1, value2, "commonstate");
            return (Criteria) this;
        }

        public Criteria andCommonstateNotBetween(Integer value1, Integer value2) {
            addCriterion("COMMONSTATE not between", value1, value2, "commonstate");
            return (Criteria) this;
        }

        public Criteria andDatelineIsNull() {
            addCriterion("DATELINE is null");
            return (Criteria) this;
        }

        public Criteria andDatelineIsNotNull() {
            addCriterion("DATELINE is not null");
            return (Criteria) this;
        }

        public Criteria andDatelineEqualTo(Date value) {
            addCriterion("DATELINE =", value, "dateline");
            return (Criteria) this;
        }

        public Criteria andDatelineNotEqualTo(Date value) {
            addCriterion("DATELINE <>", value, "dateline");
            return (Criteria) this;
        }

        public Criteria andDatelineGreaterThan(Date value) {
            addCriterion("DATELINE >", value, "dateline");
            return (Criteria) this;
        }

        public Criteria andDatelineGreaterThanOrEqualTo(Date value) {
            addCriterion("DATELINE >=", value, "dateline");
            return (Criteria) this;
        }

        public Criteria andDatelineLessThan(Date value) {
            addCriterion("DATELINE <", value, "dateline");
            return (Criteria) this;
        }

        public Criteria andDatelineLessThanOrEqualTo(Date value) {
            addCriterion("DATELINE <=", value, "dateline");
            return (Criteria) this;
        }

        public Criteria andDatelineIn(List<Date> values) {
            addCriterion("DATELINE in", values, "dateline");
            return (Criteria) this;
        }

        public Criteria andDatelineNotIn(List<Date> values) {
            addCriterion("DATELINE not in", values, "dateline");
            return (Criteria) this;
        }

        public Criteria andDatelineBetween(Date value1, Date value2) {
            addCriterion("DATELINE between", value1, value2, "dateline");
            return (Criteria) this;
        }

        public Criteria andDatelineNotBetween(Date value1, Date value2) {
            addCriterion("DATELINE not between", value1, value2, "dateline");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}